<?php
defined('SYSPATH') OR die('No direct access allowed.');
/**
 * form.php
 * @author ranuandra
 *
 * 10 Jul 2012 10:08:45
 *
 * 
 */
$namabulan = array('', 'Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember');
$tgllist = array();
$blnlist = array();
$thnlist = array();

for($i = 1; $i <= 31; $i++)
{
	$tgllist[$i] = $i;
}
for($j = 1; $j <= 12; $j++)
{
	$blnlist[$j] = $namabulan[$j];
}
$thn = date("Y");
$thnlalu = $thn - 50;
for($k = $thn; $k >= $thnlalu; $k--)
{
	$thnlist[$k] = $k;
}
?>
	<div class="page-header">
		<h2>Keluarga Kandung</h2>
	</div>
	<div class="row">
    	<div class="span12">
               	<?php echo Form::open(URL::base().'keluargakandung/save', array('class' => 'form-horizontal'));?>
                 	<fieldset class="level">
                		<legend>Keluarga Kandung</legend>
                         <div class="control-group">
                        	<label class="control-label" for="Bidang">Nama</label>
                        	<div class="controls">
								<?php echo Form::input('nama', '', array()) ?>
                        	</div>
                        </div>
                          <div class="control-group">
                        	<label class="control-label" for="Bidang">Hubungan Keluarga</label>
                        	<div class="controls">
								<?php echo Form::select('mstkeluarga_id', $keluargas, '', array()) ?>
                        	</div>
                        </div>
                         <div class="control-group">
                        	<label class="control-label" for="Bidang">Tempat Lahir</label>
                        	<div class="controls">
								<?php echo Form::input('tempat_lahir', '', array()) ?>
                        	</div>
                        </div>
                        <div class="control-group">
                        	<label class="control-label" for="Tanggal">Tanggal Lahir</label>
                        	<div class="controls">
                        	<?php echo Form::select('tanggal', $tgllist, '', array('class' => 'input-small'))?> - 
                        	<?php echo Form::select('bulan', $blnlist, '', array('class' => 'input-small'))?> -
                        	<?php echo Form::select('tahun', $thnlist, '', array('class' => 'input-small'))?>
                        	<?php 
                        	if(isset($errors['tgl_lahir']))
                        	{
								echo "<span class=\"error\">". $errors['tgl_lahir']."</span>";
                        	}
                        	?>
                        	</div>
                        </div>
                        <div class="control-group">
                         	<label class="control-label" for="Sex">Jenis Kelamin</label>
                         	<div class="controls">
                         		<div class="radio inline">
                        			<input type="radio" name="jenis_kelamin" value="Pria"/>Pria
                        		</div>
                        		<div  class="radio inline">
                        			<input type="radio" name="jenis_kelamin"  value="Wanita"/>Wanita
                        		</div>
                        	</div>
                        </div>
                         <div class="control-group">
                        	<label class="control-label" for="Bidang">Agama</label>
                        	<div class="controls">
								<?php echo Form::select('mstagama_id', $agamas, '', array()) ?>
                        	</div>
                        </div>
                         <div class="control-group">
                        	<label class="control-label" for="Bidang">Pendidikan</label>
                        	<div class="controls">
								<?php echo Form::select('mstpendidikan_id', $pendidikans, '', array()) ?>
                        	</div>
                        </div>
                         <div class="control-group">
                        	<label class="control-label" for="Bidang">Pekerjaan</label>
                        	<div class="controls">
								<?php echo Form::input('pekerjaan', '', array()) ?>
                        	</div>
                        </div>       
                	</fieldset>

                     <fieldset>
                         <div class="form-actions">
                         	 <input type="submit" name="submit" value="Save" class="btn btn-primary" />
                             <button class="btn btn-primary">Cancel</button>
                        </div>                   
                    </fieldset>
                  <?php echo Form::close()?>
          </div>
     </div>